﻿using Kooboo.IoC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kooboo.Domain;

namespace Kooboo.Commerce.Contexts.ShopSettings
{
    public static class EditorBehavior
    {
        public static void Put(this IEditor actor, IShopSetting shopSetting)
        {
            using (var transaction = ObjectContainer.CreateInstance<TransactionContext>())
            {
                var repository = ContextContainer.Current.Resolve<IShopSettingRepository>();
                repository.Put(shopSetting);
                transaction.Commit();
            }
        }

    }
}
